#pragma once
#include <MsHTML.h>
#include <xmllite.h>

#include <memory>
#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <unordered_map>
#include <functional>
#include <algorithm>

#include "Element.h"

using std::wstring;
using std::unique_ptr;
using std::vector;

class CPage
{
public:
	CPage(IXmlReader* pReader) throw(...);
	~CPage(void);

	const vector<unique_ptr<CElement>>* GetElements() const;
	const wstring& GetUrl() const;
	void Fill(IHTMLDocument2* document) throw(...);

private:
	vector<unique_ptr<CElement>> _ve;
	wstring _url;
	wstring _name;

	void InitPageFromXml(IXmlReader* pReader) throw(...);
	bool ContainsActiveX() const throw();
};

